Conventionally, various games have been developed in which a player object operated by a player is moved on a map. On the map, additional game elements (items, enemy characters, doors, a start point, a goal point, and the like) are disposed. With these game elements being not fixedly but changeably disposed, variety is added to the map, thereby allowing the game to proceed without making the user weary of the game. For example, in a conventional game machine as disclosed in Japanese Patent Laid-Open Publication No. 2000-107441, such game elements are randomly disposed on the map.
In the game machine disclosed in the in Japanese Patent Laid-Open Publication No. 2000-107441, the game elements, such as enemy elements and items, are randomly disposed on the map. Specifically, a memory of the game machine has stored, in its fixed area having a predetermined shape and size, a plurality of maps which form different patterns of terrains in the whole area. A game machine computer selects one map in accordance with the degree of difficulty of the game, and then randomly disposes the above game elements on the map. With this, it is possible to obtain a map having the game elements being differently disposed every time the game is played.
In the above-described conventional game machine, the game elements, such as the enemy characters and other items, are randomly disposed. Therefore, the game elements are not necessarily disposed at positions appropriate for the progress of the game. For example, when the random process disposes many items or an important enemy character at the start point on the generated map, the enjoyment of playing the game on the map is quickly satisfied in the vicinity of the start point, thereby making the game less entertaining. Moreover, when there are a plurality of routes to the destination on the map, the degrees of difficulty of these routes do not depend on how the game elements are disposed on each route, and therefore the player may easily arrive at the destination through the selected route.
Exemplary illustrative non-limiting implementations herein provide a game machine and a data storage medium having a game program stored therein allowing additional game elements to be not fixedly but changeably disposed at an appropriate position on a map.
The exemplary illustrative non-limiting implementation has the following features to attain the object mentioned above:                calculating a unit score for each of the units, the unit score being determined based on route information regarding a route starting from a start unit serving as a start point on the game map to each unit;        selecting, based on the unit score calculated in the unit score calculating step, a unit on which the game element is disposed; and        disposing the game element on the unit selected in the disposition unit selecting step.        
A first aspect of an exemplary illustrative non-limiting implementation is directed to a game machine for disposing an additional game element (an enemy character, a gate, an item, a goal point) on a game map formed by a plurality of units (which exemplarily corresponds to, in the preferred exemplary illustrative non-limiting arrangement, a room unit RU, a passage unit PU, a cap unit CU). The game machine includes: unit score calculating means (which exemplarily corresponds to, in the preferred exemplary illustrative non-limiting arrangement, a CPU 31 steps executing S82, S86, and S94; only step numbers are hereinafter shown), disposition unit selecting means (S84, S91, S99, S104), and game element disposition means (S84, S91, S99, S104). The unit score calculating means calculates a unit score for each of the units, the unit score being determined based on route information regarding a route (route distance, the number and type of an enemy character located on the route, the number and type of a gate located on the route) starting from a start unit serving as a start point on the game map to each unit. The disposition unit selecting means selects a unit on which the game element is disposed, based on the unit score calculated by the unit score calculating mean. The game element disposing means disposes the game element on the unit selected by the disposition unit selecting means. Note that the game machine may further include start unit determining means which determines the start unit including the start point on this map. Also, in the game machine, the unit score may be determined in consideration of, in addition to the information regarding the route to the relevant unit, information regarding the inside of the unit (the number and type of enemy characters, for example). Furthermore, if the unit score of the start unit is calculated, although not necessarily required, one exemplary scheme used for calculation is based on the game elements located in the start unit. In this case, the unit score may be set higher as the number of enemy characters is larger. Alternatively, the unit score may be set higher as the strength of the enemy character is higher. In another calculation scheme, the unit score of the start unit may be set to a predetermined value (0, for example).
According to the above configuration of the exemplary illustrative non-limiting implementation, the unit score is calculated based on the information regarding the route from the start point on the game map to each unit. By using the route distance, the number and type of the enemy characters located on the route, the number and type of the gates located on the route, etc., as the route information, it is possible to cause the unit score to indicate the degree of difficulty for the player character or the like to arrive at the unit. Also, by using the number and type of the items located on the route, etc., as the route information, it is possible to cause the unit score to indicate the merit obtained until the player character or the like arrives at the unit. Then, by using the unit score, a game element is additionally disposed on the game map. Therefore, the game element can be appropriately disposed in accordance with the degree of difficulty or the merit. For example, when the unit score indicates the degree of difficulty, the following examples can be thought. That is, in order to set a precious item to be difficult for the player to obtain, the precious item may be disposed on a unit having a high unit score. Also, an item supporting the player may be disposed on a unit having a high unit score. Furthermore, a goal point may be set in a unit having the highest unit score. Still further, a weak enemy character may be disposed on a unit having a low unit score, while a strong enemy character may be disposed on a unit having a high unit score. Still further, when the unit score indicates the merit, a strong enemy character may be disposed on a unit having a high unit score, for example. These are merely examples, and the unit score may be used in various manners depending on the contents of the game and the intention of the game designer. By contrast to the above examples, depending on the contents of the game, a precious item may be disposed on a unit having a lower unit score, or a game element may be disposed on a unit having an intermediate unit score. As described above, although the unit score indicates the degree of difficulty or the merit, description is hereinafter made mainly to a case where the unit score indicates the degree of difficulty. The same description goes for the case where the unit score indicates the merit.
By way of example only, the unit score calculating means calculates a distance parameter for each of the units as the unit score, the distance parameter being indicative of a distance of the route starting from the start unit to each unit. With this, as the distance from the start point to a unit is longer, it is more difficult for the object to arrive at that unit. Therefore, by calculating a distance parameter indicative of the distance, the unit score representing the degree of difficulty by the distance can be obtained. Then, based on the distance parameter, a game element is disposed. Therefore, the game element can be appropriately disposed in consideration of the entertainment aspect of the game. For example, a game element, such as a goal point, the most important enemy character, an item, etc., which is preferably disposed on the unit farther away from the start point, can be appropriately disposed in accordance with the distance from the start point. For example, each of the units includes at least one connecting portion (door DR) for connection to another unit, and with the connecting portion being connected to another connecting portion of the other unit, the units are combined to form the game map. In this case, the game machine may further include connecting portion distance data defining means (a unit storage area 322 storing the door-to-door distance table). The connecting portion distance data defining means defines connecting portion distance data (door-to-door distance data) indicative of a distance between the connecting portions in a unit having a plurality of the connecting portions. The unit score calculating means calculates the distance parameter by totaling the connecting portion distance data for connecting portions to be passed through on the route starting from the start unit to each unit. With this, the distance parameter can be appropriately and easily calculated.
In another example, the unit score calculating means calculates the unit score based on game elements located in a unit to be passed through on the route starting from the start unit to each unit. With this, as the unit has more game elements serving as obstacles, such as enemy characters and doors, which the object, such as the player character, encounters on a route from the start point to one unit, it is more difficult to arrive at that unit. Therefore, the unit score representing the degree of difficulty by the obstacle can be obtained. Also, as the unit has more game elements, such as town people characters, which the object encounters on a route from the start point to one unit and which give the object an item or a hint, the merit of arriving at that unit is larger. Therefore, the unit score representing the merit can be obtained. Then, based on the unit score indicative of the degree of difficulty or the merit, the game element is disposed. Therefore, the game element can be appropriately disposed in consideration of the entertainment aspect of the game. For example, a game element, such as a goal point or the most important item, that is preferably disposed on the unit at which the object arrives from the start point after clearing many obstacles can be appropriately disposed based on the obstacles on the route from the start point. Also, the game machine may further include attribute value setting means. The attribute value setting means sets a unique attribute value (the strength of the enemy, the strength of the gate) based on a type of each of the game elements. The unit score calculating means calculates the unit score based on the attribute value set to each of the game elements located in the unit to be passed through. With this, when the object encounters the enemy character, which is a game element, while traveling from the start point, the strength of the enemy character, etc., will have an influence on the degree of difficulty in arriving at the unit. Since the unit score is set in consideration of the attribute value of the strength of the enemy character, the unit score more accurately indicative of the degree of difficulty can be set. Also, for example, if the unit score is set in consideration of the effectiveness of the item, the unit score accurately indicative of the merit can be set.
For example, each of the units includes at least one connecting portion for connection to another unit, and with the connecting portion being connected to another connecting portion of the other unit, the units are combined to form the game map. In this case, the game machine may further include connecting portion score calculating means (S825, S826, S830). The connecting portion score calculating means calculates, for each connecting portion, a connecting portion score (door score) determined based on route information regarding a route from the start unit to each connecting unit. The unit score calculating means calculates the unit score for each of the units based on the connecting portion score calculated for the connecting portion included in a relevant unit (S828). With this, in consideration of the connecting portion serving as an entrance or exit of each unit, the connecting portion score indicative of the degree of difficulty or the merit for the object to travel from the start point to that connecting portion can be calculated. Then, the unit score of the unit including the connecting unit is calculated with the connecting portion score. Therefore, each unit score can be appropriately and easily obtained. Furthermore, the unit score calculating means may calculate the unit score for a unit which includes a plurality of the connecting portions based on a minimum value of the connecting unit scores calculated for the connecting portions (S825 through S828). In this case, the unit score of the unit including the connecting portion is calculated with the minimum value of the connecting portion score. Therefore, the unit score obtained when the object travels from the start point to each unit with a lowest degree of difficulty and the easiest travel can be appropriately and easily obtained. Still further, start unit connecting portion score temporarily-setting means may be provided, which calculates the connecting portion score for each of the connecting portions included in the start unit through a predetermined calculation scheme and temporarily sets the calculated connecting portion score. Here, the predetermined calculation scheme is, for example, a scheme based on the game element located in the start unit. In this case, the connecting portion score is set higher as the number of enemy characters located in the start unit is larger (or as the strength of the enemy characters is larger) or when a gate is set in that connecting portion included in the start unit. In another exemplary calculation scheme, a predetermined value (0, for example) may be set to all connecting portions included in the start unit. Still further, the unit score calculating means may include: minimum connecting portion score determining means (S825), the coupled connecting portion score determining means (S826), and connecting portion score temporarily-setting means (S830). The minimum connecting portion score determining means determines a minimum value of the connecting portion scores temporarily set to the connecting portions as the connecting portion score of a connecting portion having the minimum value. The coupled connecting portion score determining means determines the minimum value as the connecting portion score of a connecting portion coupled to the connecting portion whose connecting portion score has been determined by the minimum connecting portion score determining means. The connecting portion score temporarily-setting means calculates a connecting portion score for a first connecting portion whose connecting portion score has not yet been determined and temporarily sets the calculated connecting portion score, the first connecting portion being included in a unit which also includes a second connecting portion whose connecting portion score has been determined by the minimum connecting portion score determining section or the coupled connecting portion score determining section, and the connecting portion score for the first connecting portion being calculated based on route information regarding a route from the second connecting portion to the first connecting portion included in the unit (S830). With a repeat of processes performed by the minimum score determining means, the coupled connecting portion score determining means, and the connecting portion score temporarily-setting means (a repeat of steps S825 through S830), the unit score calculating means sequentially determines connecting portion scores of the connecting portions on the game map, and calculates the unit score based on the determined connecting portion scores (S828). With this, the minimum connecting portion score is determined with priority by taking the connecting portion score of the start unit in which the start point is set as a starting point. Also, based on the determined connecting portion score, the unit score is also determined. Therefore, to all units and connecting portions formed on the game map, it is possible to reliably calculate their unit scores and connecting portion scores by using the lowest degree of difficulty for the object to arrive from the start unit.
The disposition unit selecting means may select the unit on which the game element is disposed so that a ratio of a unit score of one unit with respect to a total of the unit scores is equal to a probability of selecting the one unit (S96 through S99). With this, each degree of difficulty for the object to arrive at each unit from the starting point is evaluated with respect to the entire degree of difficulty, and based on the evaluation, the game element can be disposed. For example, a game element can be reliably disposed with priority on the unit having a relatively high or the highest degree of difficulty. With this, a game element, such as a goal point or the most important item, that is preferably disposed on the unit at which the object arrives with difficulty after traveling from the start point can be appropriately disposed. Also, if a unit is selected based on a ratio of the degree of difficulty with respect to the entire degree of difficulty, as the unit has a higher degree of difficulty, the ratio of disposing a game element on that unit can be higher.
The disposition unit selecting means may include transformed unit score calculating means (S88, S96, S101). The transformed unit score calculating means calculates a transformed unit score (Tx) by transforming the unit score calculated by the unit score calculating means through a predetermined function (Scmax+Scmin−Sc(Ux) or the positive square root of Sc(Ux)). The disposition unit selecting means selects the unit on which the game element is disposed so that a ratio of a unit score of one unit with respect to a total of the unit scores is equal to a probability of selecting the one unit (S88 through S91 or S101 through S104). Thus, the unit score is transformed by using the predetermined function, and then the transformed unit score is used. With the function being appropriately set, the game elements can be disposed in various manners. For example, the unit having a lower degree of difficulty is prioritized for disposition. Alternatively, the unit having a higher degree of difficulty is prioritized for disposition but its degree of priority is reduced or increased. For example, the function used by the transformed unit score calculating means is varied depending on a type of the game element to be disposed by the game element disposing means. With this, it is possible to control the disposition point of the game element by the function depending on the type of the game element. Here, various types of game elements can be thought. For example, a goal point may be of a type not necessarily required to be disposed on a unit having a high degree of difficulty, and an obstacle may be of a type desired to be disposed on a unit having a low degree of difficulty. By selecting the function in accordance with the type of the game element, it is possible to balance between randomness of disposition of the game elements and units to be disposed.
Also, the disposition unit selecting means may include: random number generating means (S90, S98, S103) and range assigning means (FIG. 25). The random number generating means generates a random number in a predetermined range. The range assigning means assigns a part of the predetermined range to each of the units based on a ratio of each unit score with respect to the total of the unit scores or a ratio of each unit score with respect to a total of the transformed unit scores. The disposition unit selecting means selects the unit on which the game element is disposed depending on whether the random number generated by the random number generating means is within the part of the range assigned to the unit by the range assigning means.
For example, the game map include at least a unit including a point (start slot Ss, goal slot Sg, enemy slot Se, item slot Si) at which the game element can be disposed. In this case, the disposition unit selecting means may include: random number generating means and range assigning means (FIG. 28). The random number generating means generates a random number within a predetermined range. The range assigning means sets the unit score of the unit including the point as a point score of the point, and assigns a part of the predetermined range to each of a plurality of the points based on a ratio of each point score with respect to a total of point scores or a ratio of each point score transformed through a predetermined function with respect to a total of the transformed point scores. The disposition unit selecting means selects a point where the game element is disposed depending on whether the random number generated by the random number generating means is within the part of the range assigned to the point by the range assigning means. With this, a game element can be appropriately disposed at a point in the unit.
The game machine may further includes unit storage means (unit storage area 322 for storing a unit image data group) and game map generating means (S1 through S7). The unit storage means stores in advance the plurality of the units. The game map generating means generates the game map by randomly combining the units stored in the unit storage means. With this, effects similar to those of the first aspect of the exemplary illustrative non-limiting implementation can be obtained also for the automatically-generated game map full of diversity. Also, by combining the diversity in disposition of the game element with the diversity of the game map itself, a game map full of variation can be generated.
A second aspect of the exemplary illustrative non-limiting implementation is directed to a game machine for disposing an additional game element on a game map which is formed by a plurality of units and defines an area in which an object can move in the course of a game. The game machine includes: unit score calculating means, disposition unit selecting means, and disposition unit selecting means. The unit score calculating means calculates a unit score for each of the units, the unit score being a parameter indicative of a degree of difficulty for the object to move from a start unit serving as a start point on the game map to each unit. The disposition unit selecting means selects, based on the unit score calculated by the unit score calculating means, a unit on which the game element is disposed. The game element disposing means disposes the game element on the unit selected by the disposition unit selecting means.
According to the above configuration of the exemplary illustrative non-limiting implementation, the unit score is calculated in accordance with the degree of difficulty for the object to move to each unit. By using this unit score, a game element is additionally disposed on the game map. Therefore, the game element can be appropriately disposed in accordance with the degree of difficulty.
A third aspect of the exemplary illustrative non-limiting implementation is directed to a data storage medium having stored therein a game program causing a computer to execute a process of disposing an additional game element on a game map formed by a plurality of units. The game program stored in the data storage medium includes the steps of: a unit score calculating step (S82, S86, S94), a disposition unit selecting step (S84, S91, S99, S104), and a game element disposing step (S84, S91, S99, S104). In the unit score calculating step, a unit score is calculated for each of the units, the unit score being determined based on route information regarding a route starting from a start unit serving as a start point on the game map to each unit. In the disposition unit selecting step, a unit on which the game element is disposed is selected based on the unit score calculated in the unit score calculating step. In the game element disposing step, the game element is disposed on the unit selected in the disposition unit selecting step. With this, effects similar to those obtained by the above game machine can be obtained also by the computer executing the game program recorded on the recording medium.
By way of example only, in the unit score calculating step, a distance parameter is calculated for each of the units as the unit score, the distance parameter being indicative of a distance of the route starting from the start unit to each unit. In another example, in the unit score calculating step, the unit score is calculated based on game elements located in the unit to be passed through on the route starting from the start unit to each unit. For example, each of the units includes at least one connecting portion for connection to another unit, and with the connecting portion being connected to another connecting portion of the other unit, the units are combined to form the game map. In this case, the game program stored in the data storage medium may further include a start unit connecting portion score temporarily-setting step (S824). In this step, a connecting portion score is calculated for each of connecting portions included in the start unit through a predetermined calculation scheme, and the calculated connecting portion score is temporarily set. Also, the unit score calculating step includes a minimum connecting portion score determining step (S825), a coupled connecting portion score determining step (S826), and a connecting portion score temporarily-setting step (S830). In the minimum connecting portion score determining step, a minimum value of the connecting portion scores temporarily set to the connecting portions is determined as the connecting portion score of a connecting portion having the minimum value. In the coupled connecting portion score determining step, the minimum value is determined as the connecting portion score of a connecting portion coupled to the connecting portion whose connecting portion score has been determined in the minimum connecting portion score determining step. In the connecting portion score temporarily-setting step, a connecting portion score is calculated for a first connecting portion whose connecting portion score has not yet been determined and is temporarily set. The first connecting portion is included in a unit which also includes a second connecting portion whose connecting portion score has been determined in the minimum connecting portion score determining step or in the coupled connecting portion score determining step, and the connecting portion score for the first connecting portion is calculated based on route information regarding a route from the second connecting portion to the first connecting portion included in the unit. In the unit score calculating step, with a repeat of the minimum score determining step, the coupled connecting portion score determining step, and the connecting portion score temporarily-setting step, connecting portion scores of the connecting portions on the game map are sequentially determined, and the unit score is calculated based on the determined connecting portion score.
By way of example only, in the disposition unit selecting step, the unit on which the game element may be disposed is selected so that a ratio of a unit score of one unit with respect to a total of the unit scores is equal to a probability of selecting the one unit.
In another example, the disposition unit selecting step includes the steps of: a random number generating step and a range assigning step. In the random number generating step, a random number is generated in a predetermined range. In the range assigning step, a part of the predetermined range is assigned to each of the units based on a ratio of each unit score with respect to a total of the unit scores or a ratio of each unit score calculated in the unit score calculating step and then transformed through a predetermined function with respect to a total of the transformed unit scores. In the disposition unit selecting step, the unit on which the game element is disposed is selected depending on whether the random number generated in the random number generating step is within the part of the range assigned to the unit in the range assigning step.